.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    -webkit-box-orient: vertical;
    font-size: 0.8rem;
    padding: 0.3rem;
}

/* 轮播图 */
.swiper {
    width: 100%;
    height: 26vh;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 分类导航 */
.category {
    display: flex;
    justify-content: space-between;
    /* padding: 1rem; */
    /* padding: 0.9rem; */
    width: 100vw;
    background: white;
}

.category div i {
    font-size: 1.3rem;
    color: #f66b6b;
}

.category div p {
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* 内容卡片 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.3rem;
    border-bottom: 1px solid #e8eaec;
}

.grid .card {
    background: white;
    /* border-radius: 10px; */
    overflow: hidden;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
}

.grid .card img {
    object-fit: cover;
}

.grid .card h3 {
    font-size: 1rem;
    margin: 0.5rem;
    color: #000;
    height: 74px;
}

.grid .card p {
    font-size: 0.9rem;
    padding: 0 0.5rem 1rem;
}

/* 列表卡片start */
.list-card {
    padding: 0.4rem;
    border-bottom: 1px solid #e8eaec;
}
.list-card a:last-child {
    border-bottom: none;
}

.list-card:last-child {
    padding-bottom: 56px;
}

.list-card .list-card-header {
    font-size: 15px;
    line-height: 22px;
    color: #000;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    background: #fff;
}

.footer button {
    background: #f66b6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    width: 80%;
    max-width: 300px;
}

.footer button:hover {
    background: #d24d4d;
}

/* 媒体查询适配不同屏幕 */
@media (min-width: 768px) {
    .swiper {
        height: 50vh;
    }

    .category div i {
        font-size: 2rem;
    }

    .category div p {
        font-size: 1rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .grid .card img {
        max-height: 20vh;
    }
}

@media (min-width: 1024px) {
    .swiper {
        height: 60vh;
    }

    .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer button {
        max-width: 400px;
    }
}
